package com.example.demo.util;

/**
 * Created by lsp on 16/8/1.
 */
public class ResMesg {

    String msg;

    int status;

    Object data;

    public ResMesg() {
        this.status = 0;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
    public enum StatusEnum{
        Failed(0,"失败"),
        Success(1,"成功"),
        NoPrivilege(2,"没有权限"),
        notAllowed(3,"当前状态不能进行当前操作"),
        SuccessWithoutData(4,"成功但没有数据"),
        InternalError(500,"内部错误")
        ;
        public final Integer status;
        public final String desc;
        private StatusEnum(Integer status,String desc){
            this.status = status;
            this.desc = desc;
        }
    }
}
